/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author George
 */
@Entity
@Table(name = "RECLAMOS", catalog = "BDACCELCOM", schema = "dbo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Reclamos.findAll", query = "SELECT r FROM Reclamos r"),
    @NamedQuery(name = "Reclamos.findByNroReclamo", query = "SELECT r FROM Reclamos r WHERE r.nroReclamo = :nroReclamo"),
    @NamedQuery(name = "Reclamos.findByFecha", query = "SELECT r FROM Reclamos r WHERE r.fecha = :fecha"),
    @NamedQuery(name = "Reclamos.findByMotivo", query = "SELECT r FROM Reclamos r WHERE r.motivo = :motivo")})
public class Reclamos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "NroReclamo")
    private Integer nroReclamo;
    @Column(name = "Fecha")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecha;
    @Column(name = "Motivo")
    private String motivo;
    @JoinColumn(name = "NroVenta", referencedColumnName = "NroVenta")
    @ManyToOne(optional = false)
    private Venta nroVenta;
    @JoinColumn(name = "IdEmpleado", referencedColumnName = "IdEmpleado")
    @ManyToOne
    private Usuario idEmpleado;

    public Reclamos() {
    }

    public Reclamos(Integer nroReclamo) {
        this.nroReclamo = nroReclamo;
    }

    public Integer getNroReclamo() {
        return nroReclamo;
    }

    public void setNroReclamo(Integer nroReclamo) {
        this.nroReclamo = nroReclamo;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public String getMotivo() {
        return motivo;
    }

    public void setMotivo(String motivo) {
        this.motivo = motivo;
    }

    public Venta getNroVenta() {
        return nroVenta;
    }

    public void setNroVenta(Venta nroVenta) {
        this.nroVenta = nroVenta;
    }

    public Usuario getIdEmpleado() {
        return idEmpleado;
    }

    public void setIdEmpleado(Usuario idEmpleado) {
        this.idEmpleado = idEmpleado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nroReclamo != null ? nroReclamo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reclamos)) {
            return false;
        }
        Reclamos other = (Reclamos) object;
        if ((this.nroReclamo == null && other.nroReclamo != null) || (this.nroReclamo != null && !this.nroReclamo.equals(other.nroReclamo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.Reclamos[ nroReclamo=" + nroReclamo + " ]";
    }
    
}
